
Version:=4.10.1
ModuleName:=monit

Objcet:=$(ModuleName).tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjcetSource:=$(ModuleName)-$(Version).tar.gz

DependFiles:=

InstallDirTmp:=usr/local
InstallDir:=/$(InstallDirTmp)
InstallEtc:=etc

Config:=./configure  --prefix=$(InstallDir) --without-largefiles #--without-ssl

Patch:= 

.PHONY: all clean dist_clean

all:$(Objcet) 

$(Objcet):$(ObjcetSource) monitrc
	tar -xzf $(ObjcetSource)
	$(Patch)
	cd $(ObjectDir) && $(Config)
	$(MAKE) -C $(ObjectDir) 
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	rm -rf $(InstallDirTmp)/share
	if [ ! -d $(InstallEtc) ]; then mkdir -p $(InstallEtc); fi
	cp -rf monitrc $(InstallEtc) 
	chmod 0700 $(InstallEtc)/monitrc
	tar -cvzf $(Objcet) usr etc

patch:

clean:
	rm -rf usr $(Objcet) etc

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjcetSource) *.tar.gz *.new *.bz2
	
include ../Makefile.Res
